/* 
 * File:   Animation.h
 * Author: agu
 *
 * Created on 24 de mayo de 2014, 18:51
 */

#ifndef ANIMATION_H
#define	ANIMATION_H
#include <SDL2/SDL.h>
#include <string>
#include <vector>
#include "Texture.h"

using std::string;
using std::vector;
class Animation {
public:
    
    Animation(SDL_Renderer* renderer,const string path,int x,int y);
    SDL_Rect getFrame(int frame);
    ~Animation();
    void render();
    void updateMovement();
    void updatePosition();
    string getKeyName();
private:
    Texture texture;
    int currentFrame;
    string keyName;
    //Walking animation
    //int WALKING_ANIMATION_FRAMES = 4;
    int frames;
    vector<SDL_Rect> currentSprite;
    vector<SDL_Rect> spritesUp;
    vector<SDL_Rect> spritesDown;
    vector<SDL_Rect> spritesLeft;
    vector<SDL_Rect> spritesRight;
    //SDL_Rect spriteClips[ WALKING_ANIMATION_FRAMES ];
    const Uint8 * keys;
    int vx,vy;

};

#endif	/* ANIMATION_H */

